import request from '@/utils/request'

// 创建投诉
export function createReporting(data) {
	return request({
		url: '/system/reporting/create',
		method: 'post',
		data: data
	})
}

// 更新投诉
export function updateTaskReception(data) {
	return request({
		url: '/platform/task-reception/update',
		method: 'put',
		data: data
	})
}

// 删除投诉
export function deleteTaskReception(id) {
	return request({
		url: '/platform/task-reception/delete?id=' + id,
		method: 'delete'
	})
}

// 获得投诉
export function getReport(id) {
	return request({
		url: '/system/reporting/get?id=' + id,
		method: 'get'
	})
}

// 获得投诉分页
export function getTaskReceptionPage(params) {
	return request({
		url: '/platform/task-reception/page',
		method: 'get',
		params
	})
}
// 导出投诉 Excel
export function exportTaskReceptionExcel(params) {
	return request({
		url: '/platform/task-reception/export-excel',
		method: 'get',
		params,
		responseType: 'blob'
	})
}


export function getAllManageUserView(params) {
	return request({
		url: '/platform/users/allManageUserView',
		method: 'get'
	})

}

export function getReportingPicListByReportingId(reportingId) {
      return request({
        url: '/system/reporting/reporting-file/list-by-reporting-id?reportingId=' + reportingId,
        method: 'get'
      })
    }